package com.hospital.wx.service.Impl;

import com.hospital.wx.dao.DoctorAppointmentsDao;
import com.hospital.wx.service.DoctorAppointmentsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.HashMap;

@Service
@Slf4j
public class DoctorAppointmentsServiceImpl implements DoctorAppointmentsService {
    @Autowired
    private DoctorAppointmentsDao doctorAppointmentsDao;

    @Override
    public ArrayList<HashMap> selectAll() {
        return doctorAppointmentsDao.selectAll();
    }

    @Override
    @Transactional
    public int cancelAppointment(Integer id) {
        return doctorAppointmentsDao.cancelAppointment(id);
    }



}
